package com.agv.web.hdr;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction;

public class HdrDispatchAction extends DispatchAction {

	public ActionForward hdrInicio(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		request.getSession().removeAttribute("catCompleto");
		request.getSession().removeAttribute("catInsertado");
		request.getSession().removeAttribute("catalogoObj");
		request.getSession().removeAttribute("altaCatalogo");
		request.getSession().removeAttribute("actualizarCatalogo");
		request.getSession().removeAttribute("pasoActual");
		request.getSession().removeAttribute("totalPasos");
		request.getSession().removeAttribute("buscaCatalogo");
		request.getSession().removeAttribute("ruta");
		request.getSession().removeAttribute("modulo");
		request.getSession().removeAttribute("subModulo");
		request.getSession().removeAttribute("funcion");
		request.getSession().removeAttribute("primerAcceso");
		return mapping.findForward("inicio");
	}

	public ActionForward hdrCerrarSesion(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		request.getSession().invalidate();
		return mapping.findForward("cerrarSesion");
	}

}
